 $(function () {
     $.ajax({
         type: "GET",
         url: "http://pk.tebieshengqian.com/get_hot_key",
         dataType: "json",
         success: function (data) {
             console.log(data);
             if (data.code ===0) {
                 var data = data.result;
                 var str = '';
                 str += '<div>'+data.hot_key+'</div>'
             }else {

             }
             $('.navtop_search').html(str)
         }
     })
 })

 $(function () {
     $.ajax({
         type: "GET",
         url: "http://pk.tebieshengqian.com/get_catelog",
         dataType: "json",
         success: function (data) {
             console.log(data);
             var data = data.result.list
             console.log(data);
             var str = '<ul>'
             $.each(data, function (i, obj) {
                 var id = data[i].opt_id
                 if (i !=0) {
                     str += '<li class="inner_nav" style="display: inline-block;">';
                     str += '<a href="#" style="color: black">' + obj.opt_name + '</a>';
                     str += '</li>';
                 }
             });
                 str += '</ul>'
             $(".nav_shopping").append(str);

         }
     })
 })